home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Game-Power
/
Amiga Game-Power.iso
/
anwendungen
/
gw print
/
structurebrowser_v1.3
/
sources
/
sbview.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-20
|
4KB
|
143 lines
/*
Handles: ColorMap, View and ViewPort
Not implemented:
ColorMap.Flags
ColorMap.Type
ViewPort.DspIns
ViewPort.SprIns
ViewPort.ClrIns
ViewPort.UCopIns
ViewPort.RasInfo
View.LOFCprList
View.SHFCprList
View.Modes
*/
#include "header/sb.h"
extern int level;
PrColorMap (string, colormap)
char *string;
struct ColorMap *colormap;
{
static struct StructData structdata[] = {
{ "(Flags", "UBYTE)", PRUBYTE, BYTESIZE },
{ "(Type", "UBYTE)", PRUBYTE, BYTESIZE },
{ "-Count", "UWORD", PRUINT, INTSIZE },
{ " ColorTable", "APTR", PRPTR, PTRSIZE }
};
int i, sum;
int choice = -1;
level++;
while (choice)
{
sum = SetOptionText(string, structdata, (APTR)colormap, DATASIZE, 0);
switch (choice = GetChoice(DATASIZE))
{
case 4:
HexDump("Hexdump of Color Table:",
colormap->ColorTable, INTSIZE,
(long)colormap->Count * INTSIZE);
break;
}
}
level--;
}
PrViewPort (string, viewport)
char *string;
struct ViewPort *viewport;
{
static struct StructData structdata[] = {
{ " Next", "struct ViewPort *", PRPTR, PTRSIZE },
{ " ColorMap", "struct ColorMap *", PRPTR, PTRSIZE },
{ "(DspIns", "struct CopList *)", PRPTR, PTRSIZE },
{ "(SprIns", "struct CopList *)", PRPTR, PTRSIZE },
{ "(ClrIns", "struct CopList *)", PRPTR, PTRSIZE },
{ "(UCopIns", "struct UCopList *)", PRPTR, PTRSIZE },
{ "-DWidth", "SHORT", PRINT, INTSIZE },
{ "-DHeight", "SHORT", PRINT, INTSIZE },
{ "-DxOffset", "SHORT", PRINT, INTSIZE },
{ "-DyOffset", "SHORT", PRINT, INTSIZE },
{ " Modes", "UWORD", PRUINT, INTSIZE },
{ "-Reserved", "UWORD", PRUINT, INTSIZE },
{ "(RasInfo", "struct RasInfo *)", PRPTR, PTRSIZE }
};
static char *modenames[16] = {
NULL, "GENLOCK_VIDEO", "LACE", NULL,
NULL, NULL, "PFBA", "EXTRA_HALFBRITE",
"GENLOCK_AUDIO", NULL, "DUALPF", "HAM",
NULL, "VP_HIDE", "SPRITES", "HIRES"
};
int i, sum;
int choice = -1;
level++;
while (choice)
{
sum = SetOptionText(string, structdata, (APTR)viewport, DATASIZE, 0);
switch (choice = GetChoice(DATASIZE))
{
case 1:
if (viewport->Next)
PrViewPort("The next ViewPort in the list", viewport->Next);
break;
case 2:
if (viewport->ColorMap)
PrColorMap("The ViewPort's ColorMap", viewport->ColorMap);
break;
case 11:
FlagPrint("Modes for this ViewPort",
modenames, (ULONG)viewport->Modes);
break;
}
}
level--;
}
PrView (string, view)
char *string;
struct View *view;
{
static struct StructData structdata [] = {
{ " ViewPort", "struct ViewPort *", PRPTR, PTRSIZE },
{ "(LOFCprList", "struct cprlist *)", PRPTR, PTRSIZE },
{ "(SHFCprList", "struct cprlist *)", PRPTR, PTRSIZE },
{ "-DyOffset", "short", PRINT, INTSIZE },
{ "-DxOffset", "short", PRINT, INTSIZE },
{ "(Modes", "UWORD)", PRUINT, INTSIZE }
};
int i, sum;
int choice = -1;
level++;
while (choice)
{
sum = SetOptionText(string, structdata, (APTR)view, DATASIZE, 0);
switch (choice = GetChoice(DATASIZE))
{
case 1:
if (view->ViewPort)
PrViewPort("The View's first ViewPort", view->ViewPort);
break;
}
}
level--;
}